Skip to content

fix(terminal): a new shell starts at the project root - #240

Merged
JeffreyJYZ merged 1 commit into
mainfrom
fix/terminal-cwd
Nov 22, 2026
Merged

JeffreyJYZ merged 1 commit into
mainfrom
fix/terminal-cwd

Conversation

@jyzbot

@jyzbot jyzbot commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

With src/main.cpp open, a new terminal opened in src/: useTerminalSessions chose parentDir(activePath) ?? root. A shell is for the project, not for the file that happens to be focused, so the root is now the only answer for a new session and activePath is no longer consulted.

Restart is a different question, and it deliberately behaves differently: it keeps the directory that session was opened in, as long as that directory still lists, and falls back to the root only when it has vanished. Jumping a live shell to the root on restart would be the same surprise in the other direction.

Red first: 2 failing — a shell opened at /proj/src, and a restart reopened a deleted /proj/src. Green: 9 across the three terminal suites, full bun test 1468, gate 11/11.

@vercel

vercel Bot commented Nov 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
quarry-docs Building Building Preview Nov 22, 2026 4:32am UTC

@JeffreyJYZ
JeffreyJYZ merged commit ef53ed1 into main Nov 22, 2026
5 of 6 checks passed
@JeffreyJYZ
JeffreyJYZ deleted the fix/terminal-cwd branch November 22, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants